package cn.seecoder.ai.config;

import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @author fanyanpeng
 * @date 2023/4/6 2:00
 */

public class WebResourceConfig implements WebMvcConfigurer {
    @Override
    public void configurePathMatch(PathMatchConfigurer configurer) {
        // 为所有的RestController暴露的服务接口url 添加前缀/api
        configurer.addPathPrefix("/api", c -> c.isAnnotationPresent(RestController.class));
    }
}

